package com.woniuxy.edubureau.serviceimpl;

import com.woniuxy.commons.entity.SchoolLeader;
import com.woniuxy.commons.entity.User;
import com.woniuxy.edubureau.dao.LeaderMapper;
import com.woniuxy.edubureau.service.LeaderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: luojiwei
 * @date: 2020/7/17 15:11
 * @description:
 */
@Service
public class LeaderServiceImpl implements LeaderService {
    @Autowired
    private LeaderMapper leaderMapper;
    @Override
    public int createLeader(SchoolLeader schoolLeader) {
        return leaderMapper.createLeader(schoolLeader);
    }

    @Override
    public List<SchoolLeader> getSchoolLeaderByPage(int page, int limit) {
        return leaderMapper.getSchoolLeaderByPage(page,limit);
    }

    @Override
    public Long getSchoolLeaderOfNums() {
        return leaderMapper.getSchoolLeaderOfNums();
    }

    @Override
    public int getMaxId() {
        return leaderMapper.getMaxId();
    }

    @Override
    public SchoolLeader getSchoolLeaderById(int lid) {
        return leaderMapper.getSchoolLeaderById(lid);
    }

    @Override
    public void add(User user) {
        leaderMapper.add(user);
    }
}
